{template "header.html"}

<div class="note note-danger">
    <p><a href="javascript:dr_update_cache();">{dr_lang('更改数据之后需要更新缓存之后才能生效')}</a></p>
</div>
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
    {$form}
    <div class="portlet bordered light myfbody">
        <div class="portlet-title tabbable-line">
            <ul class="nav nav-tabs" style="float:left;">
                <li class="{if $page==0}active{/if}">
                    <a href="#tab_0" data-toggle="tab" onclick="$('#dr_page').val('0')"> <i class="fa fa-cog"></i> {dr_lang('插件设置')} </a>
                </li>
            </ul>
        </div>
        <div class="portlet-body">
            <div class="tab-content">
                <div class="tab-pane {if $page==0}active{/if}" id="tab_0">
                    <div class="form-body">
                        <div class="form-group">
                            <label class="col-md-2 control-label">账号类型</label>
                            <div class="col-md-9">
                                <div class="mt-radio-inline">
                                    <label class="mt-radio mt-radio-outline"><input onclick="rr(this.value)" type="radio" name="data[bdtj][zh]" value="1" {if $data.bdtj.zh ==1}checked=""{/if}> 百度商业账号 <span></span></label>
                                    <label class="mt-radio mt-radio-outline"><input onclick="rr(this.value)" type="radio" name="data[bdtj][zh]" value="2" {if $data.bdtj.zh ==2}checked=""{/if}> 百度账号(停止使用) <span></span></label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group pt" >
                            <label class="col-md-2 control-label">{dr_lang('评论次数')}</label>
                            <div class="col-md-9">
                                <div class="mt-radio-inline">
                                    <label class="mt-radio"><input type="radio" name="data[num]" value="1" {if $data['num']}checked{/if} /> {dr_lang('评论一次')} <span></span></label>
                                    <label class="mt-radio"><input type="radio" name="data[num]" value="0" {if !$data['num']}checked{/if} /> {dr_lang('不限制')} <span></span></label>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">数据库操作权限</label>
                            <div class="col-md-9">
                                <div class="mt-checkbox-inline">
                                    <label class="mt-checkbox mt-checkbox-outline">
                                        <input type="checkbox"  checked disabled > 读取
                                        <span></span>
                                    </label>
                                    <label class="mt-checkbox mt-checkbox-outline">
                                        <input type="checkbox" name="data[setting][action][]" {if dr_in_array('insert', $setting.action)} checked{/if} value="insert"> 插入
                                        <span></span>
                                    </label>
                                    <label class="mt-checkbox mt-checkbox-outline">
                                        <input type="checkbox" name="data[setting][action][]" {if dr_in_array('update', $setting.action)} checked{/if} value="update"> 更新
                                        <span></span>
                                    </label>
                                    <label class="mt-checkbox mt-checkbox-outline">
                                        <input type="checkbox" name="data[setting][action][]" {if dr_in_array('delete', $setting.action)} checked{/if} value="delete"> 删除
                                        <span></span>
                                    </label>
                                </div>
                                <span class="help-block">{dr_lang('对数据表数据增删改的操作权限')}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('功能开关')}</label>
                            <div class="col-md-9">
                                <input type="checkbox" name="data[use]" value="1" {if $data['use']}checked{/if} data-on-text="{dr_lang('已开启')}" data-off-text="{dr_lang('已关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">AppId</label>
                            <div class="col-md-9">
                                <input class="form-control input-xlarge" type="text" name="data[appid]" value="{$data['appid']}" >
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">AppSecret</label>
                            <div class="col-md-9">
                                <input class="form-control input-xlarge" type="text" name="data[appsecret]" value="{$data['appsecret']}" >
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">AppId</label>
                            <div class="col-md-9">
                                <textarea class="form-control" style="height:100px" name="data[xieyi]">  </textarea>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>

        <div class="portlet-body form myfooter">
            <div class="form-actions text-center">
                <button type="button" onclick="dr_ajax_submit('{dr_now_url()}&page='+$('#dr_page').val(), 'myform', '2000')" class="btn green"> <i class="fa fa-save"></i> {dr_lang('保存')}</button>
            </div>
        </div>
</form>



{template "footer.html"}